#pragma once
namespace graph_basic
{
typedef unsigned long graph_id_t;
typedef unsigned long vertex_in_graph_id_t;
typedef float lat_lon_t;
struct vertex_id_t 
{ 
   vertex_id_t(graph_id_t graph_id, vertex_in_graph_id_t vertex_in_graph_id)
   :  graph_id_(graph_id)
   ,  vertex_in_graph_id_(vertex_in_graph_id)
   {}
   vertex_id_t()
   {}
   bool operator == (vertex_id_t b)
   {
      return (graph_id_ == b.graph_id_ && vertex_in_graph_id_ == b.vertex_in_graph_id_);
   }
   bool operator != (vertex_id_t b)
   {
      return !((*this) == b);
   }   
   graph_id_t graph_id_;
   vertex_in_graph_id_t vertex_in_graph_id_;
};

inline bool operator < (vertex_id_t a, vertex_id_t b)
{
   if (a.graph_id_ < b.graph_id_)
      return true;
   else if (a.graph_id_ == b.graph_id_)
      return (a.vertex_in_graph_id_ < b.vertex_in_graph_id_);
   else return false;
}

struct point_t
{
   point_t(lat_lon_t lat, lat_lon_t lon)
      :  lat_(lat)
      ,  lon_(lon)
   {}
   point_t()
   {}
   lat_lon_t lat_;
   lat_lon_t lon_;
};
typedef std::pair<vertex_id_t, vertex_id_t> vertex_id_pair_t;
typedef std::pair<point_t, point_t> point_pair_t;
typedef char high_way_t;
typedef std::map<std::string, high_way_t> high_way_dict_t;
typedef unsigned long graph_int_t;

std::string static const ONEWAY_YES("yes");
std::string static const ONEWAY_NO("no");
std::string static const ONEWAY_REVERSE("-1");

std::string static const PATH_TYPE_ALL("all");
std::string static const PATH_TYPE_MOTOR("motor");
std::string static const PATH_TYPE_BICYCLE("bicycle");
std::string static const PATH_TYPE_FOOT("foot");

static lat_lon_t const MAX_FLOAT = 9999999.0f;
}